package com.dz.risk.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.IService;
import com.dz.risk.pojo.domain.TemporaryTableOfDataEntity;
import com.dz.risk.pojo.model.PageModel;
import org.springframework.web.multipart.MultipartFile;

import java.io.IOException;
import java.util.List;

/**
 * @author yinpl
 * @email
 * @date 2021-09-02 16:12:01
 */
public interface TemporaryTableOfDataService extends IService<TemporaryTableOfDataEntity> {

    void add(TemporaryTableOfDataEntity temporaryTableOfDataEntity);

    IPage<TemporaryTableOfDataEntity> query(PageModel pageModel, TemporaryTableOfDataEntity temporaryTableOfDataEntity);

    /**
     * 根据指标ID跟版本号查询数据
     *
     * @param indexId 指标ID
     * @param date    版本号
     * @return 指标集合
     */
    List<TemporaryTableOfDataEntity> selectByIndexIdAndDate(String indexId, Long date);

    List<TemporaryTableOfDataEntity> selectByParams();

    /**
     * 需求表编码模板导入
     *
     * @param file 文件流
     * @throws IOException
     */
    void importOfDataCodingTemplateForDemandForm(MultipartFile file) throws IOException;


    /**
     * 导入模板编码的实际数据
     *
     * @param file 文件流
     * @param date 数据版本
     * @throws IOException
     */
    void importTheActualDataOfTheTemplateEncoding(MultipartFile file, Long date) throws IOException;
}

